package github.kawaiior.yuanchuxiuzhen.common.entity.ai;

import github.kawaiior.yuanchuxiuzhen.common.entity.addon.PuBirdEntity;
import net.minecraft.entity.ai.goal.Goal;

import java.util.EnumSet;

public class PuBirdFlyGoal extends Goal {

    private PuBirdEntity entity;

    public PuBirdFlyGoal(PuBirdEntity bird) {
        this.entity = bird;
        this.setMutexFlags(EnumSet.of(Flag.MOVE, Flag.JUMP));
    }

    @Override
    public boolean shouldExecute() {
        return !entity.isBirdLanded();
    }
}
